﻿using Orchard.ContentManagement;
using Orchard.ContentManagement.Records;
using Orchard.Environment.Extensions;

namespace ATTools.Models
{
    [OrchardFeature("ATTools.MicrosoftTranslatorWidget")]
    public class TranslationWidgetRecord : ContentPartRecord
    {
        /// <summary>
        /// The color of the widget.
        /// </summary>
        public virtual string Color { get; set; }

        /// <summary>
        /// The border color of the widget.
        /// </summary>
        public virtual string BorderColor { get; set; }

        /// <summary>
        /// The width of the widget.
        /// </summary>
        public virtual string Width { get; set; }
    }

    [OrchardFeature("ATTools.MicrosoftTranslatorWidget")]
    public class TranslationWidgetPart : ContentPart<TranslationWidgetRecord>
    {
        public string Color
        {
            get { return Record.Color; }
            set { Record.Color = value; }
        }

        public string BorderColor
        {
            get { return Record.BorderColor; }
            set { Record.BorderColor = value; }
        }

        public string Width
        {
            get { return Record.Width; }
            set { Record.Width = value; }
        }

    }
}